//
//  ForgetPassWordCell.m
//  WHB_driver
//
//  Created by 徐国庆 on 15/12/28.
//  Copyright (c) 2015年 turing. All rights reserved.
//

#import "ForgetPassWordCell.h"

@implementation ForgetPassWordCell

- (void)awakeFromNib {
    // Initialization code
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
                
        // 图标  34 * 34
        self.textImageView = [[UIImageView alloc] init];//WithFrame:CGRectMake(45, CGRectGetMaxY(logoImageView.frame) + 20, 34, 34)];
//        self.textImageView.image = [UIImage imageNamed:@"icon_Box_user"];
        [self.contentView addSubview:self.textImageView];
        
        // 电话号码
        self.contentTextField = [[UITextField alloc] init];//WithFrame:CGRectMake(CGRectGetMaxX(photoImageView.frame), photoImageView.frame.origin.y, 200, photoImageView.frame.size.height)];
//        UIColor *color = [UIColor HexStrWithColor:@"999999"];
//        self.contentTextField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"请输入手机号" attributes:@{NSForegroundColorAttributeName: color}];
        self.contentTextField.secureTextEntry = NO; //密码
        self.contentTextField.autocorrectionType = UITextAutocorrectionTypeNo;
        self.contentTextField.autocapitalizationType = UITextAutocapitalizationTypeNone;
        self.contentTextField.returnKeyType = UIReturnKeyDone;
        self.contentTextField.clearButtonMode = UITextFieldViewModeWhileEditing; //编辑时会出现个修改X
//        self.contentTextField.delegate = self;
        self.contentTextField.backgroundColor = [UIColor clearColor];
//        self.contentTextField.textColor = [UIColor HexStrWithColor:@"999999"];
        [self.contentView addSubview:self.contentTextField];

        self.lineLabel = [[UILabel alloc] init];
        [self.contentView addSubview:self.lineLabel];
        
        self.QrCodeButton = [UIButton buttonWithType:UIButtonTypeCustom];
        [self.contentView addSubview:self.QrCodeButton];
        
    }
    return self;
}

- (void)layoutSubviews{
    [super layoutSubviews];
    
    
    self.textImageView.frame = CGRectMake(15, 2, 14, 16);
    self.contentTextField.frame = CGRectMake(CGRectGetMaxX(self.textImageView.frame) + 5, -5, 300, 34);
    self.lineLabel.frame = CGRectMake(15, CGRectGetMaxY(self.textImageView.frame) + 5, (self.contentView.frame.size.width - 30), 1);
    self.QrCodeButton.frame = CGRectMake(self.contentView.frame.size.width - 100, 0, 80, (self.contentView.frame.size.height - 20));
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
